﻿using Rf.Common.Const;
using Rf.Repository;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rf.Support.Model
{
    /// <summary>
    /// 字典
    ///</summary>
    [SugarTable("Dict", TableDescription = "字典表")]
    public class Dict : RootEntityTkey<long>
    {
        /// <summary>
        /// 父id
        ///</summary>
        [SugarColumn(ColumnName = "ParentId", ColumnDescription = "父id")]
        public virtual long ParentId { get; set; }

        /// <summary>
        /// 字典文字
        ///</summary>
        [SugarColumn(ColumnName = "DictLabel", ColumnDescription = "字典文字", Length = 200)]
        public virtual string DictLabel { get; set; }

        /// <summary>
        /// 字典值
        ///</summary>
        [SugarColumn(ColumnName = "DictValue", ColumnDescription = "字典值", Length = 200)]
        public virtual string DictValue { get; set; }

        /// <summary>
        /// 分类
        ///</summary>
        [SugarColumn(ColumnName = "Category", ColumnDescription = "分类", Length = 200)]
        public virtual string Category { get; set; }

        /// <summary>
        /// 排序码
        ///</summary>
        [SugarColumn(ColumnName = "SortCode", ColumnDescription = "排序码")]
        public int SortCode { get; set; }


        /// <summary>
        /// 子节点
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<Dict> Children { get; set; }


        /// <summary>
        ///获取或设置是否禁用，逻辑上的删除，非物理删除
        /// </summary>
        public bool? IsDeleted { get; set; }
    }
}
